package com.qys.livesMall.shop.modal.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author gmx
 * @since 2023-06-19
 */
@Getter
@Setter
@TableName("h2_shop_order_sku")
@Schema(name = "ShopOrderSku", description = "")
public class ShopOrderSku implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "店铺id")
    private Long shopId;
    @Schema(description = "店铺名")
    private String shopName;
    @Schema(description = "主播id")
    private Long anchorId;
    @Schema(description = "任务id")
    private Long taskId;
    @Schema(description = "SKU_ID")
    private Long skuId;

    @Schema(description = "订单ID")
    private Long orderId;

    @Schema(description = "商品名称")
    private String name;

    @Schema(description = "单价")
    private BigDecimal price;
    @Schema(description = "成本单价")
    private BigDecimal costPrice;
    @Schema(description = "数量")
    private Integer num;

    @Schema(description = "总金额")
    private BigDecimal money;

    @Schema(description = "图片地址")
    private String image;
    @Schema(description = "发货时间")
    private Long consignTime;

    @Schema(description = "交易完成时间")
    private Long endTime;
    @Schema(description = "邮费")
    private BigDecimal postage;
    private Long stocksId;
    @Schema(description = "sku订单id")
    private String skuOrderId;
    @Schema(description = "运单号")
    private String express;
    @Schema(description = "订单状态,0:未发货,1:已发货，2：确认收货")
    private Integer orderStatus;
    /**
     * 退货之前状态，用户取消退货恢复
     */
    private Integer returnBeforeStatus;
    @Schema(description = "结算状态,0:未结算，1：已结算")
    private String settlementStatus;

    private Long userId;

    private String virtualUser;

    private LocalDateTime createTime;

    @Schema(description = "评论状态,0:未评论，1：已评论")
    private String review;

    /**
     * 二级分类Id
     */
    private Long categoryId;
    /**
     * 是否支付成本
     */
    private Integer costPay;
    /**
     * 成本支付渠道
     */
    private Integer costPayType;
    /**
     * 支付时间
     */
    private LocalDateTime payTime;

    @TableField(exist = false)
    private String skuAttr;


    @TableField(exist = false)
    private Long shopGoodsId;

    @TableField(exist = false)
    private ShopOrderReturnApproved returnInfo;

    @TableField(exist = false)
    private ShopOrderReturnExpress userReturnExpress;

    @TableField(exist = false)
    private ShopOrderReturnExpress platformReturnExpress;
}
